home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 5
/
Apprentice-Release5.iso
/
Source Code
/
Libraries
/
SAT 2.3.8
/
Demos
/
SATminimal demo ƒ
/
SATminimal.p
< prev
next >
Wrap
Text File
|
1996-05-23
|
1KB
|
43 lines
{Minimal demo program, with a few sprites moving back and forth.}
program SATminimal;
uses
{$ifc UNDEFINED THINK_PASCAL}
Types, QuickDraw, Menus, Windows, TextEdit, Fonts,
Dialogs, Memory, Events, {}
{$endc}
SAT, sMySprite;
var
ignoreSp: SpritePtr;
l: longint;
begin
{Standard Inits are done by Think Pascal.}
{$ifc UNDEFINED THINK_PASCAL}
SATInitToolbox;
{$endc}
{Initialize, using PICTs 128 or 129 as background, Classic-sized drawing area}
SATInit(128, 129, 512, 322);
{Initialize sprite unit(s), by preloading faces and sounds}
InitMySprite;
{Make some sprites}
ignoreSp := SATNewSprite(0, 50, 50, @SetupMySprite);
ignoreSp := SATNewSprite(0, 100, 100, @SetupMySprite);
ignoreSp := SATNewSprite(0, 125, 120, @SetupMySprite);
ignoreSp := SATNewSprite(0, 150, 140, @SetupMySprite);
ignoreSp := SATNewSprite(0, 200, 180, @SetupMySprite);
ignoreSp := SATNewSprite(0, 250, 200, @SetupMySprite);
ignoreSp := SATNewSprite(0, 300, 250, @SetupMySprite);
repeat
l := TickCount;
SATRun(true); {Run one frame of animation}
while l > TickCount - 3 do {Maximize speed to 20 fps}
;
until Button;
SATSoundShutUp; {Always de-allocate the sound channel before quitting!}
end.